" are used to specify the start and end positions of the match, because we only intend to replace the number in "BIT_MASK_0, therefore, only the matching area is set to a number during search.Because we need to replace the numbers of different rows with different values, we need to use an expression to calculate the value after replacement. When the replacement string of the ": s" command starts with "/=", it indicates that the result calculated using an expression is replaced. The expression he
ACTION_UP event, if the returned value in onTouchEvent is false, onTouchEvent only calls ACTION_DOWN instead of ACTION_UP.
1. Create two classes LLayout. The LView is as follows:
Copy codeThe Code is as follows: public class LLayout extends FrameLayout {
// ViewGroup
@ Override
Public boolean onInterceptTouchEvent (MotionEvent ev ){
Log. I ("LTAG", "LLayout onInterceptTouchEvent ");
Log. I ("LTAG", "LLayout onInterceptTouchEvent default return" + sup
Create a simple canvas for Android multimedia development and learning
A simple canvas can be drawn, selected, and saved. Of course, this tool is commonly used in communication software, such as QQ and feiqiu.
Among them, we must listen to the touch events of the fingers. The touch events of the fingers are divided into three types: Press, lift, and move. Usually we only need to press the link, and then the entire finger Sliding Process. Then draw different straight lines during finger sliding.
'Let's create another Java module anotationVisible, is two annotation classes:@Target (Elementtype.type) @Retention (retentionpolicy.class) public @interface lactivity {} @Target (Elementtype.field) @Retention (retentionpolicy.runtime) public @interface lview { int value () default 0;}Then our main project introduced these two module can be used under our main project with this annotation, we make project will be in the project directory under BU
, Ontouch continues to invoke the Action_up event. If the return value in Ontouchevent is false, then ontouchevent will only invoke Action_down without invoking action_up.
1, the new two class Llayout, LView as follows
Copy Code code as follows:
public class Llayout extends Framelayout {
ViewGroup
@Override
public boolean onintercepttouchevent (Motionevent ev) {
LOG.I ("Ltag", "Llayout onintercepttouchevent");
LOG.I ("Ltag", "Llayout
In the development of the project, it is possible that some of the widgets brought by the system do not meet our needs, then we need to customize the view.
By looking at common widgets like Button,textview,edittext in the system, they all inherit from view, so we naturally need to inherit view when inheriting custom view.1, first create a new class LView inherited from view
Copy Code code as follows:
public class
View the number of files in a directoryLs-l |grep "^-" |wc-lOrFind./company-type F | Wc-lView the number of files in a directory, including subdirectories.Ls-lr|grep "^-" |wc-lView the number of directories under a folder, including those in subdirectories.Ls-lr|grep "^d" |wc-lDescriptionLs-lLong list output file information in this directory (note the file here, different from the general file, may be the
Tags:. com mount also matches LSP Understanding manager Issue DevSystemuname -aView kernel/Os/cpu informationhead -n 1 /etc/issueViewing the operating system versioncat /proc/cpuinfoView CPU InformationhostnameView computer Namelspci -tvList all PCI deviceslsusb -tvList all USB deviceslsmodList the loaded kernel modulesenvView environment variablesResourcesfree -mView memory usage and swap usagedf -hView the usage of each partitiondu -sh To view the size of a specified directorygrep MemTotal /pr
Reference documentsHttp://www.cnblogs.com/emanlee/p/3587571.htmlThe following are the operation in Centos 6.5Viewing the system version[Email protected] ~]# cat/etc/redhat-releaseView Kernel version[Email protected] ~]# Uname–rView number of Bits[Email protected] ~]# uname–mView all information[Email protected] ~]# Uname–aView Physical number of CPUs[[Email protected] ~] #cat/proc/cpuinfo| grep "Physical ID" | Sort| uniq| Wc-lView each physical the nu
the browser.13.shell paragraph Notes:14. View the server serial numberDmidecode |grep "Serial number"(This command can also be used to view other hardware information for the machine)15. Check if the network cable is physically connected/sbin/mii-toolView the number of Apache processes (number of Apache concurrency in prefork mode)Ps-ef | grep httpd | Wc–lIdentify 20 processes with a high CPU utilizationPS-E-o pcpu,pid,user,sgi_p,cmd |grep-v pid| Sort-k 1| Tail-20View TCP link statusNetstat-n |
server for a workstation:On this server, ' CPU cores ' for 4,physical ID has two, core ID has 8, siblings value is 8, a total of 16 processor.so this server host CPU is 2 physically packaged processors, each processor has 4 processing cores (CPU cores), each CPU core can be divided into 2 logical processors (Hyper-Threading technology), so there are 8 logical processors on each physical processor, A total of 16 processor. this time you understand. The general structure is as follows:Instruction
USB devicesLSUSB–TVto view the loaded kernel modulesLsmodView environment variable resourcesEnvView System uptime, number of users, loadUptimeView current system timeDateSync Timentpdate-u ntp.api.bz #ntp. api.bz NTP Server (Shanghai)View time ZonesDate-rto view the mounted partition statusMount | column-tto view the properties of all network interfacesifconfigView firewall Settingsiptables-lView the routing tableRoute–nSee if Port 443 is occupiedNET
Tags: ext list folder Justify top style is add marginLs-l |grep "^-" |wc-l//verified Redhat easy to useOrFind./company-type F | Wc-lView the number of files under a folder, including the subfolders.Ls-lr|grep "^-" |wc-lView the number of folders under a folder, including those in subfolders.Ls-lr|grep "^d" |wc-lDescriptionLs-lLong list output file information in this directory (note the file here, different
The following uses Centos as an example to share various information viewing methods with users. This tutorial uses Centos, Debian, and other Linux releases to view the server CPU model.
Grep "model name"/proc/cpuinfo | cut-f2-d:View server memory capacity
Grep MemTotal/proc/meminfo
Grep MemTotal/proc/meminfo | cut-f2-d:
Free-m | grep "Mem" | awk '{print $2 }'Check whether the server's CPU is 32-bit or 64-bit
Getconf LONG_BITView the current Linux version
More/etc/redhat-release cat/etc/redhat-r
(Object sender, datagridsortingeventargs E){If (E. Column. header. tostring () = "vehicle information "){
// Perform custom sorting. Remember to sort the view.Listcollectionview lview = (listcollectionview)Collectionviewsource. getdefaultview (Carlist. itemssource );Lview. customsort = new carinfocompareasc ();}}
Class carinfocompareasc: icomparer{
# Region icomparer Member
Public int compare (Objec
CentOS command for viewing various service informationView the server CPU Model
Grep "model name"/proc/cpuinfo | cut-f2-d:View server memory capacity
Grep MemTotal/proc/meminfo
Grep MemTotal/proc/meminfo | cut-f2-d:
Free-m | grep "Mem" | awk '{print $2 }'Check whether the server's CPU is 32-bit or 64-bit
Getconf LONG_BITView the current Linux version
More/etc/redhat-release cat/etc/redhat-releaseView Linux kernel version
Uname-r
Uname-View Current server time
DateView server hard disks and parti
Add the icon module (VB) to the listview control title)
'Add to the module below.The call is very simple and you can see it directly.Private type lvcolumnMask as longFMT as longCX as longPsztext as stringCchtextmax as longIsubitem as longIimage as longIorder as longEnd typeDeclare function sendmessagecolumn lib "USER32" alias "sendmessagea" (byval hwnd as long, byval MSG as long, byval wparam as long, lparam as any) as longConst lvm_first = h1000'Listview column header Consta
As the name suggests, searchview is a search view, which is similar to the automatically matched input box described earlier. However, he has his own listener and can get the user input result in real time. For the searchview control, I strongly recommend you place it on the actionbar to highlight the search function. However, the actionbar knowledge may be involved here, so here we will show you what this control is.
Layout File
Mainactivity. Java
Package COM. kale. searchview; import android.
output-X includes extended disk metrics in the output(25) Command clear--clear Screen(26) Start-up serviceService Name Start(27) ResourcesView memory usage and swap usageFree-mView the usage of each partitionDf-hTo view the size of a specified directoryDu-sh View Total Memorygrep memtotal/proc/meminfoTo view the amount of free memorygrep memfree/proc/meminfoView system uptime, number of users, loadUptimeView System LoadCat/proc/loadavg(28) disks and partitionsTo view the status of a mounted par
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.